package com;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class ApplicationListenerTest implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("销毁");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        //Application 范围最大
        //对程序经常使用的数据存放到Application作用域中
        System.out.println("初始化");
    }
}
